<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="_adminfragment::head(~{::title},~{})">
    <meta charset="utf-8">
    <title>分类管理</title>
    <link rel="stylesheet" type="text/css" href="../../static/lib/layui/css/layui.css"/>
    <script src="../../static/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div th:replace="_adminfragment::header"></div>
    <div th:replace="_adminfragment::side('category')"></div>
    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 20px;">
            <div class="layui-form" lay-filter="category-add-form">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">分类代码</label>
                        <div class="layui-input-inline">
                            <input type="text" name="categoryCode" autocomplete="off" placeholder="请输入分类代码"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">分类名称</label>
                        <div class="layui-input-inline">
                            <input type="text" name="categoryName" autocomplete="off" placeholder="请输入分类名称"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn" lay-submit lay-filter="add_btn">添加</button>
                    </div>
                </div>
            </div>

            <table class="layui-hide" id="category_tb" lay-filter="category_tb"></table>

            <script type="text/html" id="barDemo">
                <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
            </script>
        </div>
        <div th:replace="_adminfragment::footer"></div>
    </div>
    <div th:replace="_adminfragment::footer"></div>
</div>
<script th:src="@{/js/admin/category.js}" type="text/javascript" charset="utf-8"></script>
<script type="text/html" id="category_form_tmpl">
    <div class="layui-form" lay-filter="category-update-form" style="margin-top: 20px;">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">分类代码</label>
                <div class="layui-input-inline">
                    <input type="text" name="categoryCode" autocomplete="off" placeholder="请输入分类代码" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">分类名称</label>
                <div class="layui-input-inline">
                    <input type="text" name="categoryName" autocomplete="off" placeholder="请输入分类名称" class="layui-input">
                </div>
            </div>
        </div>
    </div>
</script>
</body>
</html>
